package com.cd.javacxy.common.model.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.cd.javacxy.common.model.enums.ArticleType;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * cxy_comment实体类
 *
 * @author yanghy
 */
@Data
public class CxyComment {
    /***/
    private Integer id;
    /***/
    private Integer pid;
    /**
     * 文章的ID
     */
    private Integer articleId;
    /***/
    private String content;
    /***/
    private Integer userId;
    /***/
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * P代表PC端发出
     */
    private String sourceFrom;
    /***/
    private ArticleType articleType;
    /***/
    private String userName;
    /***/
    private String userIcon;

    private List<CxyComment> children = new ArrayList<>();

    private String showContent;

    private Integer pageNum;

}
